1
2
3
4
5
6
7 package ca.uhn.cache.internal;
8
9 import java.util.Date;
10
11 import ca.uhn.cache.CacheReasonEnum;
12 import ca.uhn.cache.IQuery;
13 import ca.uhn.cache.VolatilityEnum;
14
15 /***
16 * A block of data that is retrieved and cached together. The
17 * boundaries of a <code>IChunk</code> are defined according to
18 * <code>QueryParameter</code>s. Data items may have attributes
19 * such as category, date, name, etc. Some of these, for example
20 * category and date, will correspond to <code>QueryParameter</code>s.
21 * A <code>IChunk</code> is a grouping of data items in the same part
22 * of the <code>QueryParameter</code> space. How this space is divided
23 * is determined by a <code>ISemanticCache</code>.
24 *
25 * @author <a href="mailto:bryan.tripp@uhn.on.ca">Bryan Tripp</a>
26 * @version $Revision: 1.1 $ updated on $Date: 2005/01/24 22:53:27 $ by $Author: bryan_tripp $
27 */
28 public interface IChunk {
29
30 /***
31 * @return the unique ID of the chunk
32 */
33 public String getId();
34
35 /***
36 * @return the greatest volatility of all data in the chunk
37 */
38 public VolatilityEnum getVolatility();
39
40 /***
41 * @return the most recent time of update of all data in the chunk
42 */
43 public Date getLastUpdateTime();
44
45 /***
46 * @return the time at which the data in the chunk were cached
47 */
48 public Date getCacheTime();
49
50 /***
51 * @return the most recent time at which data in the the chunk were accessed
52 */
53 public Date getLastAccessTime();
54
55 /***
56 * @return a list of reasons why this chunk was cached
57 */
58 public CacheReasonEnum[] getReasons();
59
60 /***
61 * @return <code>IQuery</code> describing the limits of the chunk
62 * TODO: possibly replace with method to see if a data item fits here
63 */
64 public IQuery getBoundaries();
65 }